<template>

  <div>
            <a-page-header
    style="border: 1px solid rgb(235, 237, 240)"
    :title="返回"
    @back="tobrowser"
  />
    <markdown-it-vue class="md-body" :content="content"/>
  </div>
</template>

<script>
import MarkdownItVue from 'markdown-it-vue'
import 'markdown-it-vue/dist/markdown-it-vue.css'
export default {
  components: {
    MarkdownItVue
  },
  data () {
    return {
      content: '## your markdown content'
    }
  },
  created(){
      this.show()
  },
  methods: {
    async show(){
        const {data:res} = await this.$http.get('http://localhost:8081/blog/browserblog',{params:{author:window.sessionStorage.getItem('author'),title:window.sessionStorage.getItem('title')}})
        //var i = window.sessionStorage.getItem('number')
        // this.title = res.data[0].title
        this.content = res.data[0].content
        },
        tobrowser(){
            this.$router.push('/browser')
        }
  }
}
</script>
